import 'virtual:svg-icons-register'
import './assets/styles/index.scss'

import { createApp } from 'vue'

import App from './App.vue'
import store from './stores'
import router from './router'

import useIcons from './plugins/use-icons'
import i18n from './plugins/use-languages'

import ElementPlus from "element-plus"
import "element-plus/dist/index.css"
import "element-plus/theme-chalk/dark/css-vars.css"
import locale from "element-plus/es/locale/lang/zh-cn"
// element-plus图标
import * as ElementPlusIconsVue from "@element-plus/icons-vue"
import TuiPlus from "@wocwin/t-ui-plus"
import "@wocwin/t-ui-plus/index.css"

import VxeUITable from 'vxe-table'
import 'vxe-table/lib/style.css'


const app = createApp(App)
// 注册所有图标
// for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
//     app.component(key, component)
// }
// 注册ElementPlus
app.use(ElementPlus, {
    locale // 语言设置
    // size: Cookies.get('size') || 'medium' // 尺寸设置
})
app.use(TuiPlus)
app.use(store)
app.use(router)
app.use(VxeUITable)
app.use(i18n())

useIcons(app)

app.mount('#app')
